package com.k.action;

import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.springframework.beans.factory.annotation.Autowired;

import com.k.Model.SFunction;
import com.k.Service.SFunctionService;
@Namespace("/manage")
@Results({ 
	@Result(name = "login", location = "/manage/main.jsp"),	
	@Result(name = "error", location = "/manage/login.jsp") })
public class Sfunction extends BaseAction {

	private SFunctionService sfunctionservice;
	/**
	 * @return
	 */
	public String execute() {
		// TODO Auto-generated method stub
		SFunction e = new SFunction();
		e.setModel("a");
		e.setName("r");
		this.sfunctionservice.save(e);
		return LOGIN;
	}
	
	public String Select() {
		// TODO Auto-generated method stub
		SFunction e = new SFunction();
		e.setModel("a");
		e.setName("r");
		this.sfunctionservice.save(e);
		return LOGIN;
	}
	
	public SFunctionService getSfunctionservice() {
		return sfunctionservice;
	}
	public void setSfunctionservice(SFunctionService sfunctionservice) {
		this.sfunctionservice = sfunctionservice;
	} 
	
	@Override
	public String delete() throws Exception {
		return null;
	}
	@Override
	public String list() throws Exception{
		return null;
	}

	@Override
	public String update() throws Exception{
		return null;
	}

	@Override
	public String save() throws Exception{
		return null;
	}
}
